home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / New System Software Extensions / OpenDoc A6 / OpenDoc Parts Framework / OPF / OS / FWGraphx / Include / FWBndShp.h < prev    next >
Encoding:
Text File  |  1994-04-21  |  2.5 KB  |  95 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWBndShp.h
  4. //    Release Version:    $ 1.0d1 $
  5. //
  6. //    Creation Date:        3/28/94
  7. //
  8. //    Copyright:    © 1993, 1994 by Apple Computer, Inc., all rights reserved.
  9. //
  10. //========================================================================================
  11.  
  12. #ifndef FWBNDSHP_H
  13. #define FWBNDSHP_H
  14.  
  15. #ifndef FWSHAPE_H
  16. #include "FWShape.h"
  17. #endif
  18.  
  19. #ifndef FWRECT_H
  20. #include "FWRect.h"
  21. #endif
  22.  
  23. #ifndef FWINK_H
  24. #include "FWInk.h"
  25. #endif
  26.  
  27. #ifndef FWSTYLE_H
  28. #include "FWStyle.h"
  29. #endif
  30.  
  31. // ----- Foundation Includes -----
  32.  
  33. #ifndef FWSTDDEF_H
  34. #include <FWStdDef.h>
  35. #endif
  36.  
  37. //========================================================================================
  38. //    •• Forward Declarations
  39. //========================================================================================
  40.  
  41. class XMPTransform;
  42.  
  43. //========================================================================================
  44. //    •• class FW_CBoundedShapeRep
  45. //========================================================================================
  46.  
  47. class FW_CBoundedShapeRep : public FW_CShapeRep
  48. {
  49. //----------------------------------------------------------------------------------------
  50. //    • Constructors/Destructors
  51. //
  52. protected:
  53.     FW_CBoundedShapeRep();
  54.     FW_CBoundedShapeRep(const FW_SDefaultProperties& defaultProperties, const FW_CRect& rect);
  55.     
  56.     virtual ~FW_CBoundedShapeRep();
  57.     
  58. //----------------------------------------------------------------------------------------
  59. //    • Inherited API
  60. //
  61. public:
  62.     // ----- Hit Testing -----
  63.     virtual FW_HitTestPart HitTest(const FW_CPoint& test) const;
  64.  
  65.     // ----- Transform -----
  66.     virtual void    Transform(XMPTransform* transform);
  67.     virtual void    InverseTransform(XMPTransform* transform);
  68.  
  69.     virtual void    MoveShape(XMPCoordinate deltaX, XMPCoordinate deltaY);
  70.     virtual void    MoveShapeTo(XMPCoordinate x, XMPCoordinate y);
  71.  
  72.     // ----- Geometry -----
  73.     virtual FW_CRect GetShapeBounds() const;
  74.  
  75.     // ----- Stream -----
  76.     virtual void    Flatten(FW_CWritableStream& stream);
  77.     virtual void    Unflatten(FW_CReadableStream& stream);
  78.  
  79. //----------------------------------------------------------------------------------------
  80. //    • New API
  81. //
  82. public:
  83.     FW_CRect        GetRectangle() const
  84.                         {return fRect;}    
  85.     void            SetRectangle(const FW_CRect& rect)
  86.                         {fRect = rect; Changed();}
  87.                         
  88. //----------------------------------------------------------------------------------------
  89. //    • Data Members
  90. //
  91. protected:
  92.     FW_CRect        fRect;    
  93. };
  94.  
  95. #endif